import Vue from 'vue'
import Bus from '@/utils/eventBus'

const preventReClick = Vue.directive('preventReClick', {
    inserted (el, binding) {
        el.addEventListener('click', () => {
          el.disabled = true
        })
        Bus.$on('buttonStatus', function (bool) {
            el.disabled = bool
        })
    }
})

export default preventReClick
